package com.ruitu.health_2.mvp.model;

import com.ruitu.arad.api.RxUtil;
import com.ruitu.arad.base.BaseModel;
import com.ruitu.health_2.dao.http.APIRetrofit;
import com.ruitu.router_module.bean.BaseResult2;
import com.ruitu.router_module.bean.PageModel2;
import com.ruitu.router_module.bean.product.ArtMan;
import com.ruitu.router_module.bean.product.ArtManDetail;

import io.reactivex.Observable;

public class ArtManModel {

    public static class ArtManListM extends BaseModel {

        public Observable<BaseResult2<PageModel2<ArtMan>>> reqArtManListByName(int size, int num, String title) {
            return APIRetrofit.getDefault()
                    .reqArtManListByName(size, num, title)
                    .compose(RxUtil.<BaseResult2<PageModel2<ArtMan>>>subIoObMain());
        }
    }

    public static class ArtManDetailM extends BaseModel {
        public Observable<BaseResult2<ArtManDetail>> reqArtManDetail(String artId) {
            return APIRetrofit.getDefault()
                    .reqArtManDetail(artId)
                    .compose(RxUtil.<BaseResult2<ArtManDetail>>subIoObMain());
        }
    }
}
